//
//  WebController.m
//  HaiGeEr_Student
//
//  Created by liuchen on 2018/9/12.
//  Copyright © 2018年 海格尔. All rights reserved.
//

#import "WebController.h"
#import "WKBottomView.h"

@interface WebController ()
@property (nonatomic,weak) WKBottomView *bottomsView;
@end

@implementation WebController
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [[CoachTabBarController shareLZHTabbarController].tabBar setHidden:YES];
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [[CoachTabBarController shareLZHTabbarController].tabBar setHidden:NO];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self createSubViews];
}

#pragma mark ==========创建视图==========
- (void)createSubViews{
    //顶端右侧分享按钮
//    [self setNavRightBarButton:CGRectMake(0, 0, 8*SCALEUNIT, 8*SCALEUNIT) title:nil action:@selector(shareChange:) normalImage:[UIImage imageNamed:@"1-2-2.png"] highlightImage:[UIImage imageNamed:@"1-2-2.png"]];
    //底端功能键
    WKBottomView *bottomsView = [[WKBottomView alloc]initWithFrame:CGRectMake(0, self.view.frame.size.height-self.navigationController.navigationBar.frame.size.height, [UIScreen mainScreen].bounds.size.width, self.navigationController.navigationBar.frame.size.height)];
    [bottomsView.collectBtn addTarget:self action:@selector(collectChange:) forControlEvents:UIControlEventTouchUpInside];
    [bottomsView.praisesBtn addTarget:self action:@selector(praisesChange:) forControlEvents:UIControlEventTouchUpInside];
    _bottomsView = bottomsView;
    [self.view addSubview:self.bottomsView];
}

#pragma mark ==========分享==========
- (void)shareChange:(UIButton *)btn{
    
}

#pragma mark ==========收藏==========
- (void)collectChange:(UIButton *)btn{
    btn.selected = !btn.selected;
}

#pragma mark ==========点赞==========
- (void)praisesChange:(UIButton *)btn{
    btn.selected = !btn.selected;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
